package com.syni.mdd.yhd.common.all.service.pay.aiPay;

import com.alipay.api.AlipayClient;
import com.alipay.api.request.AlipayTradeRefundRequest;
import com.alipay.api.response.AlipaySystemOauthTokenResponse;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import com.syni.mdd.yhd.common.all.entity.BmsDxOrder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.Map;

public interface AliPayService {

    void appAliPayNotify(HttpServletRequest request, String alipay_public_key);

    void test(Integer orderId,Integer payWay);

    Map<String,Object> refund(AlipayClient alipayClient, AlipayTradeRefundRequest request, ParamsMap paramsMap) throws Exception;

    boolean refundMoney(BmsDxOrder bmsDxOrder,Double orderRefund,AlipayClient alipayClient);

    boolean orderPayHand(String info,BmsDxOrder bmsDxOrder, Date nowTime);

    String getOrderSubject(BmsDxOrder bmsDxOrder);

    AlipayClient getAlipayClient(Integer orderTime);

    AlipayClient getAlipayClient();

    AlipayClient getAliMiniAppClient();

    void transfersMoneyToCustomerByAliPay(BmsDxOrder bmsDxOrder, String uid);

    boolean transfersMoneyToPersonalAlipay(Double transMoney, String uid,String bizNo);

    boolean transfersMoneyToPersonalAlipay(Double transMoney, String uid,String bizNo,Integer channel);

    void payByMiniApp(int i);

    Map<String, Object> authMiniAppUser(AlipaySystemOauthTokenResponse userResponse);

    Map<String, Object> miniAppPhone(String aliUserId,String paramStr);

    Map<String, Object> saveUserMes(ParamsMap paramsMap);

    boolean transferFullCoupon(Double transMoney,String businessPayId);

    void appPayServicePayNotify(HttpServletRequest request, HttpServletResponse response);

    Map<String, Object> appOrderQuery(String orderNo,Double actualConsum);

    Map<String, Object> appOrderQuery(String orderNo,AlipayClient alipayClient);

    void orderRefundQuery(String orderNo,String requestNo);
}
